package com.bdqn.t296.noso.service.Imp;

import com.bdqn.t296.noso.entity.Role;
import com.bdqn.t296.noso.entity.User;
import com.bdqn.t296.noso.mapper.UserMapper;
import com.bdqn.t296.noso.service.UserService;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImp implements UserService {
    @Resource
    UserMapper userMapper;


    //登录查询
    @Override
    @Cacheable(value = "user", keyGenerator = "keyGenerator")
    public User doLogin(@Param("loginname") String loginname) {
        return userMapper.doLogin(loginname);
    }

}
